<include file="Public:header"/>
<script type="text/javascript" src="__APP__/admin/js/page.js"></script>
<link type="text/css" rel="stylesheet" href="__APP__/admin/js/page.css" />
<script type="text/javascript">
$(function(){
	$("#page").SOFUPage({
		Style: "Twitter-yellow",
		NextPrev: false,
		FirstLast:false,
		AllCount:{$page.count},
		PageCount:{$page.page_size},
		NowPage: {$page.now_page},
		MaxShow: 6,
		Href: "__URL__/lists/?page={page}",
		Target: "_self",
		IsCurAble: true,
		OnChange: function (page) {
		}
	});

});
</script>

<a href="__URL__/add">添加店铺</a>
{$page_nums}
<table bordercolor="#DDDFFF" border="1" width="100%" style="border-collapse: collapse" cellpadding="3">
	<tr height="17" align="center">
	    <td class="title" width="80"></td>
		<td class="title" width="200">店铺名称</td>
		<td class="title" width="80">添加时间</td>
		<td class="title" width="40">编辑</td>
		<td class="title" width="40">删除</td>
		<td class="title">　</td>
	</tr>
<volist name="shoplist" id="shop">
	<tr height="20" bgcolor="#F1F5FA" class="cat_list">
	    <td><img src="__APP__/weishop/logo/{$shop.shop_logo}" height="50px"></td>
		<td width="200" style="font-weight:bold"><a href="__APP__/Wshop/home.html?id={$shop.shop_id}" target="_blank">{$shop.shop_name}</a></td>
		<td width="80" align="center">{$shop.create_time|date="Y-m-d",###}</td>
		<td width="40" align="center"><a href="__URL__/edit/?id={$shop.shop_id})"><img src="__APP__/statics/add44.gif"></a></td>
		<td width="40" align="center"><a href="javascript:;" onclick="del({$shop.shop_id})"><img alt="删除" src="__APP__/statics/icons/icon_delete.gif"></a></td>
		<td></td>
	</tr>
</volist>
</table>

<div id="save" style="height:40px"><div id="page"></div></div>
<script src="__APP__/statics/webox/webox.js"></script>
<link href="__APP__/statics/webox/jquery-webox.css" rel="stylesheet" type="text/css">
<script type="text/javascript">
function edit(t){
       var id=t;
		$.webox({
			height:465,
			width:950,
			bgvisibel:true,
			title:'修改店铺',
			iframe:'__URL__/edit/?id='+id
		});
}
</script>

<script>
function del(t){
    var id=t;
	if(confirm('你确认删除此店铺吗？')) {
       $.ajax({
	       type:"GET",
		   url:"__URL__/del",
		   dataType:"html",
		   data:{"id":id},
		   success:function(data){
               if(data=='1'){
				   jSuccess("<strong>删除成功！</strong>",{TimeShown : 500,VerticalPosition : 'center',HorizontalPosition : 'center',onClosed:function(){location.reload();}})
			  }else{
			      jError("<strong>删除失败!请重试</strong>",{VerticalPosition : 'center',HorizontalPosition : 'center'});
			 }
		   }
	   })

	}
}
</script>

